    CKEDITOR.plugins.add( 'imgFrame_zhongzhh',
    {
    	requires : [ 'dialog','iframedialog', 'fakeobjects' ],
	    init : function( editor )
	    {
	    	var win,dialog,doc;
	    	editor.addCommand( 'imgFrame', new CKEDITOR.dialogCommand( 'imgFrame' ) );
	    	editor.ui.addButton( 'insertImg',
	    {
	    	label : '插入图片',
			icon: 'images/insertImg.png',
			command : 'imgFrame'
	    });
	    
	    var dialogDefinition =
			{
				buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ],
				onOk: function(){
					win= this.getContentElement('iframe').getElement().$.contentWindow;
					if(win.objList.length== 0){
						alert('请选择图片!');
						return false;
					}
					else{
						var result,objList;
						objList= win.objList;
						result="";
						for(var i=0; i< objList.length;i++){
							result+= "<p style='text-align: center;'><img imgId='"+objList[i].id+"' src='"+objList[i].url+"' alt='"+objList[i].title+"'"+(objList[i].width> 600 ? ("width='600px'"):"")+"/></p>"+(objList[i].memo ? ("<p style='text-align: center;'>"+objList[i].memo+"</p>"):"");
						}
						this.getParentEditor().insertHtml(result);
					}
				}
			};
			
	    CKEDITOR.dialog.addIframe( 'imgFrame', '插入图片','/jsp/admin/resource/picture/uploads.jsp?multi=1&noConfirm=1',750,380,
	    	function(){
	    			},dialogDefinition
	    	)
	    }
    } );
